package com.zking.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zking.dao.UserInfoDao;
import com.zking.entity.Permission;

@Controller
public class MenuController {
	
	@Autowired
	private UserInfoDao userDao;
	
	@RequestMapping("/menu")
	public String showMenu(Model model) {
		List<Permission> perList = userDao.findAllPermission();
		model.addAttribute("pList", perList);
		return "menu";
	}

}
